查询 Red Envelope 对象

通过 red_envelope 对象的 id 查询一个已创建的 red_envelope 对象。

请求参数描述
RED_ID required string红包 id,该参数仅需要填写在请求地址内。

返回

返回一个已存在的 red_envelope 对象或者一个错误,详见 错误

定义

GET https://api.pingxx.com/v1/red_envelopes/{RED_ID}
\Pingpp\RedEnvelope::retrieve('RED_ID');
RedEnvelope.retrieve({RED_ID});
Pingpp::RedEnvelope.retrieve({RED_ID})
pingpp.RedEnvelope.retrieve({RED_ID});
pingpp.RedEnvelope.retrieve('RED_ID')
redEnvelope, err := redEnvelope.Get("RED_ID")
retrieve(String id)

请求示例

curl https://api.pingxx.com/v1/red_envelopes/red_KCabLO58W5G0rX90iT0az5a9 \
-u sk_test_ibbTe5jLGCi5rzfH4OqPW9KC:
\Pingpp\Pingpp::setApiKey('sk_test_ibbTe5jLGCi5rzfH4OqPW9KC');

\Pingpp\RedEnvelope::retrieve('RED_ID');
Pingpp.apiKey = "sk_test_ibbTe5jLGCi5rzfH4OqPW9KC";

RedEnvelope.retrieve("RED_ID");
Pingpp.api_key = "sk_test_ibbTe5jLGCi5rzfH4OqPW9KC"
Pingpp::RedEnvelope.retrieve("RED_ID")
var pingpp = require('pingpp')('sk_test_ibbTe5jLGCi5rzfH4OqPW9KC');
pingpp.RedEnvelope.retrieve(
  "RED_ID",
  function(err, RedEnvelope) {
   // YOUR CODE
  }
);
pingpp.api_key = 'sk_test_ibbTe5jLGCi5rzfH4OqPW9KC'
pingpp.RedEnvelope.retrieve('RED_ID')
pingpp.Key = "sk_test_ibbTe5jLGCi5rzfH4OqPW9KC"
redEnvelope, err := redEnvelope.Get("RED_ID")
try {
   RedEnvelope red = RedEnvelope.retrieve("evt_lqVSy5gbL0A68pS8YKvJzdWZ");
   Console.WriteLine(red);
} catch (Exception e) {
    Console.WriteLine(e.Message.ToString());
}

返回示例

{
  "id": "red_KCabLO58W5G0rX90iT0az5a9",
  "object": "red_envelope",
  "created": 1428499439,
  "received": null,
  "refunded": null,
  "livemode": true,
  "status": "sending",
  "app": "app_1Gqj58ynP0mHeX1q",
  "channel": "wx_pub",
  "order_no": "123456789",
  "transaction_no": null,
  "amount": 100,
  "amount_settle": 100,
  "currency": "cny",
  "recipient": "Openid",
  "subject": "Your Subject",
  "body": "Your Body",
  "description": "Your Description",
  "failure_msg":null,
  "extra": {
      "send_name": "Send Name"
  }
}